package com.itheima.xo.common;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

/**
 * @author :WuJunJie
 * packageName :com.itheima.xo.common
 * fileName :Result
 * creationTime :2022-10-28 13:10
 */
@Data
@NoArgsConstructor
@AllArgsConstructor
public class Result {
    private Boolean flag;
    private Integer code;
    private String message;
    private Object data;
    public static Result success(Object data){
        return new Result(true,20000,"success",data);
    }
    public static Result error( ){
        return new Result(false,-1,"error",null);
    }
}
